Skip to main content

LU Decomposition

lup(input: any[] | Mat) : any[]

param input - The matrix to be decomposed using the LU method. Needs to be a square matrix.

returns: any[] - The matrix L , U and the column vector p from the decomposition.

This function decomposes a square matrix using the LU decomposition method. It returns a lower triangular matrix (L), an upper triangular matrix (U), and pivot (p). Note : these can be access by calling {result}.L, {result}.U, {result}.p as we'll see in examples. This is because there are multiple returns